<?
	$params[sid] = $sid;
	$params[action] = "editHeader";
	$url = "$baseURL/$webDIR/?".encode_params($params);
	$data = get_interface_settings($id);
        if(is_array($data))
                while(list($k,$v) = each($data)){
                        $$k = $v;
                } 
	switch($header){
		case "text": 
			$ch[0]="checked";
			$text_data = $headerData;
		break;
		case "banner": 
			$ch[1]="checked";
			$banner_data = "[<?=translate('file_location');?> : <a href='http://duoservers.com$headerData'>$headerData</a>]";
		break;
		case "custom": 
			$ch[2]="checked";
			$custom_data = $headerData;
		break;
		case "flash": 
			$ch[3]="checked";
			$flash_data = "[<?=translate('file_location');?>: <a href='http://duoservers.com$headerData'>$headerData</a>]";
		break;
	}
	if($flash_exist=file_exists($baseDIR."u/upload/".$id."_header.swf"))
		 $flash_data = "[<?=translate('file_location');?>: <a href='http://duoservers.com/upload/".$id."_header.swf'>/upload/".$id."_header.swf</a>]";
	if($banner_exist=file_exists($baseDIR."u/upload/".$id."_header.jpg"))
		$banner_data = "[<?=translate('file_location');?>: <a href='http://duoservers.com/upload/".$id."_header.jpg'>/upload/".$id."_header.jpg</a>]";

        if($okMsg) {
        include ('okMsg.html');
        }
        if($errorMsg) {
        include ('errorMsg.html');
        }
        else {
        }

?> 
<table width="100%">
  <tr> 
    <td colspan=2><font class="text"> <b><?=translate('edit_header');?></b><br>
      <br>
      <?=translate('edit_header_desc');?>      
      </font></td>
  </tr>
</table>
<br>
<TABLE border=1 width="100%" class='bTable' cellspacing='0'>
  <form action='<?=$url;?>' method='POST' enctype="multipart/form-data">
	<TR>
		<TH><?=translate('header');?></TH>
	</TR>
	<TR>
		<TD>
			<input type='radio' name='type' value='text' <?=$ch[0];?> ><?=translate('text');?>
			<div>
					<table width='100%'>
						<tr>
							<td width='50'>&nbsp;</td>
							<td><input type='text' name='text_data' value='<?=$text_data?>'></td>
						</tr>
					</table>
			</div>
		</TD>
	</TR>
	<TR>
		<TD>
			<input type='radio' name='type' value='banner' <?=$ch[1];?> ><?=translate('banner');?> (700x120)  <?=$banner_data?>
			<div>
					<table width='100%'>
						<tr>
							<td width='50'>&nbsp;</td>
							<td><input type='file' name='banner_data' value=''></td>
						</tr>
					</table>
			</div>

		</TD>
	</TR>
	<TR>
		<TD>
			<input type='radio' name='type' value='flash' <?=$ch[3];?> ><?=translate('flash');?> <?=$flash_data?>
			<div>
					<table width='100%'>
						<tr>
							<td width='50'>&nbsp;</td>
							<td ><input type='file' name='flash_data' value=''></td>
						</tr>
					</table>
			</div>
		</TD>
	</TR>

	<tr>
                
      <td> <?=translate('you_must_upload');?><br>
        <br>
        <table border="1" class='bTable' cellspacing='0' align="left" width="100%">
          <tr> 
            <td width="91"><b><?=translate('flash_code');?></b></td>
            <td>&lt;embed src='/upload/<?=$id?>_header.swf' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?<br>P1_Prod_Version=ShockwaveFlash' 
              type='application/x-shockwave-flash'&gt; &lt;/embed&gt;</td>
          </tr>
          <tr> 
            <td width="91"><b><?=translate('banner_code');?></b> </td>
            <td>&lt;img src='/upload/<?=$id?>_header.jpg'&gt;</td>
          </tr>
        </table>
      </td>
        <tr>
	<TR>
		<TD>
			<input type='radio' name='type' value='custom' <?=$ch[2];?> ><?=translate('custom_html');?>
			<div>
					<table width='100%'>
						<tr>
							<td width='50'>&nbsp;</td>
							<td><textarea rows=5 cols=40 name='custom_data' id=customHTML><?=stripslashes($custom_data)?></textarea></td>
						</tr>
					</table>
			</div>
		</TD>
	</TR>

	<TR>
		<TD  align='center'>
			<input type='submit' value='<?=translate('submit');?>'>
		</TD>
	</TR>
</form>
</TABLE>
